package com.fxc.gtm.aac.work.controller;

import com.fxc.gtm.aac.work.api.bo.SysUserBo;
import com.fxc.gtm.aac.work.service.SysUserService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/api/sysUser")
@Validated
public class SysUserController {

    @Resource
    private SysUserService sysUserService;


    @GetMapping("/getUserInfoById")
    public SysUserBo getUserInfoById(@RequestParam("userId") Long userId) {
        try {
            SysUserBo sysUserBo = sysUserService.getUserInfoById(userId);
             return sysUserBo;
        } catch (Exception ex) {
            throw ex;
        }
    }

}
